Replace the coof fill-event budget with cascade eligibility semantics#95
Merged
Conversation
Under calc_on_order_fills on historical bars, the engine capped each chart bar at four broker fill events along the 4-tick proximity path. TV has no such budget: a clean-room probe (committed with its export) is reproduced trade-for-trade, 2325/2325, by eligibility semantics — orders placed by a MID-BAR recalc may fill only at the remaining extreme waypoints (gap-filling at the waypoint price, never at exact intra-segment levels, never at the close tick), pending cascade market orders roll to the next bar's open, and orders resting at bar start or placed at the bar-open recalc keep standard semantics. The budget produced the right two-cycle cap by accident but the wrong reach: it exact-level-filled cascade brackets on the final segment (the probe's +302 over-threaded windows) and truncated busy-bar resting-order fills TV allows. Mid-bar provenance is a new pending-order flag set from a scheduler bar-open marker; the cascade gate is scoped to the historical 4-tick path (the bar-magnifier path keeps its own semantics); a non-semantic runaway backstop replaces the budget constant. Four legacy assertions that encoded the budget behavior are corrected to the TV pin. Gates: the coof cohort is byte-identical (md5-verified 5148- and 524-trade exemplars; all coof corpus probes clean); probe price exactness 72.6% -> 100% with exit and pnl p90 collapsing to zero; corpus 240/11/1 zero movement; full private sweep 0 up / 0 down. A cascade exit-limit mid-segment asymmetry remains as a documented residual pending its own discriminating probe. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Under
calc_on_order_fillson historical bars the engine enforced a four-fill-event budget per chart bar. TV has no budget — a committed clean-room probe is reproduced 2,325/2,325 trade-for-trade by eligibility semantics: mid-bar-recalc ("cascade") orders fill only at remaining extreme waypoints (gap-fill at the waypoint tick, never intra-segment exact levels, never at C); cascade market orders roll to next-bar open; resting/bar-open-recalc orders keep standard semantics. The budget's two-cycle cap was right by accident, wrong in reach: +302 over-threaded windows (exact-level fills on the final segment) and truncated busy-bar resting fills.Scoped to the historical 4-tick path (bar-magnifier untouched); new mid-bar provenance flag; non-semantic runaway backstop replaces the constant. Four legacy assertions encoding the budget behavior corrected to the TV pin.
Gates (author + independent fresh-context R7, both green)
🤖 Generated with Claude Code